class Solution {
public:
    int vowelStrings(std::vector<std::string>& words, int left, int right) 
    {
        int s = 0;
        unordered_set<char> mp = {'a', 'e', 'i', 'o', 'u'};
        for (int i = left; i <= right; i++)
        {
            if (mp.count(words[i][0])&&mp.count(words[i].back()))
               s++;
        }
        return s;
    }
};
